using System;
using System.Linq;
using TestMonkey.Models;

namespace TestMonkey.Templates
{
    public class Constructor : TemplateProcessor
    {
        protected override bool ShouldRun(ModelRoot model)
        {
            if (model == null)
                throw new ArgumentNullException("model", "model is null.");

            return (model.Type.IsValueType || model.Type.IsClass) && model.Class.Constructors.Any(c => c.IsCreatable);
        }

    }
}
